


import {axios,get,post,patch,Delete} from "./request"

export const ajax = {
   getMaiZuo:(params,headers)=>get('/gateway',params,headers),
   postMaiZuo:(body,headers)=>post('/gateway',body,headers),

   getbanner:(params)=>get("/wangyi/banner",params),
   
   first:()=>get("/api/first"),  // json-server 
   adduser:(body)=>post("/api/users",body),  // json-server 
   finduser:(body)=>get("/api/users",body), 
   
   sendCaptcha:(body)=>get("/wangyi/captcha/sent",body), 
   verifyCaptcha:(body)=>get("/wangyi/captcha/verify",body), 

   findgoods:(body)=>get("/api/goods",body), 

   addCart:(body)=>post("/api/carts",body),  
   findCart:(body)=>get("/api/carts",body),
   updateCart:(id,body)=>patch("/api/carts/"+id,body), 
   deleteCart:(id,body)=>Delete("/api/carts/"+id,body), 


}